<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
/*******basic*******/
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('basic',$postdata);
		exi('设置成功');
	}
	$bankuai =array(
		array('title'=>'美食外卖','img'=>'../addons/jy_city/resource/images/waimai.png','action'=>'jy_city/merchlist//type=1'),
		array('title'=>'餐饮预定','img'=>'../addons/jy_city/resource/images/canyin.png','action'=>'jy_city/merchlist//type=1'),
		array('title'=>'酒店/民宿','img'=>'../addons/jy_city/resource/images/jd.png','action'=>'jy_city/merchlist//type=4'),
		array('title'=>'休闲/娱乐','img'=>'../addons/jy_city/resource/images/yule.png','action'=>'jy_city/merchlist//type=3'),
		array('title'=>'电影/演出','img'=>'../addons/jy_city/resource/images/dianyin.png','action'=>'jy_city/merchlist//type=6'),
		array('title'=>'丽人/美发','img'=>'../addons/jy_city/resource/images/meifa.png','action'=>'jy_city/merchlist//type=2'),
		array('title'=>'旅游','img'=>'../addons/jy_city/resource/images/lvyou.png','action'=>'jy_city/merchlist//type=4'),
		array('title'=>'周边游','img'=>'../addons/jy_city/resource/images/zhoubian.png','action'=>'jy_city/merchlist//type=4'),
		array('title'=>'顺风车','img'=>'../addons/jy_city/resource/images/qiche.png','action'=>'jy_city/merchlist//type=4'),
		array('title'=>'生活服务','img'=>'../addons/jy_city/resource/images/fuwu.png','action'=>'jy_city/merchlist//type=4'),
		array('title'=>'服装服饰','img'=>'../addons/jy_city/resource/images/yifu.png','action'=>'jy_city/merchlist//type=5'),
		array('title'=>'相亲交友','img'=>'../addons/jy_city/resource/images/xiangqin.png','action'=>'jy_city/merchlist//type=3'),
		array('title'=>'求职招聘','img'=>'../addons/jy_city/resource/images/qiuzhi.png','action'=>'jy_city/merchlist//type=3'),
	);
	$footernav =array(
		array('title'=>'首页','icon'=>'icon-shouye','action'=>'jy_city/index/'),
		array('title'=>'分销代理','icon'=>'icon-dixiaofei','action'=>'jy_commission/index/'),
		array('title'=>'发布信息','icon'=>'icon-yuding','action'=>'jy_sort/item_type/'),
		array('title'=>'入驻','icon'=>'icon-ruzhuchenggongdapx','action'=>'jy_city/ruzhu/'),
		array('title'=>'我的','icon'=>'icon-wo1','action'=>'jy_city/member.index/'),
	);
	$hdps =array(
		array('title'=>'1','picurl'=>'../addons/jy_weishop/resource/images/mobile-hdp01.jpg'),
		array('title'=>'2','picurl'=>'../addons/jy_weishop/resource/images/mobile-hdp02.jpg'),
	);
	$tags='商家服务态度很好|经典套餐可以有，下次再来|不错，速度挺快的|是现炒的，味道可以|包装很高大上啊|够辣，够味|招牌菜不错，值得推荐|小孩子很喜欢吃，健康！';
	$my_days = array(
			array('title'=>'我的商家','icon'=>'icon-wo','color'=>'#cc99ff','action'=>'jy_merch/member.mymerch/'),
			array('title'=>'我的会员','icon'=>'icon-wo','color'=>'#cc99ff','action'=>'jy_merch/member.mymember/'),
			array('title'=>'我的优惠券','icon'=>'icon-youhuiquan','color'=>'#cc99ff','action'=>'jy_weishop/coupon.myindex/'),
			array('title'=>'微信会员卡','icon'=>'icon-daifahuo','color'=>'#cc99ff','action'=>'core/member.wxcard/main/'),
			array('title'=>'余额提现','icon'=>'icon-dixiaofei','color'=>'#cc99ff','action'=>'core/member.tixian/'),
			array('title'=>'地址管理','icon'=>'icon-position','color'=>'#cc99ff','action'=>'core/member.address/'),
			array('title'=>'帮助中心','icon'=>'icon-help','color'=>'#cc99ff','action'=>'jy_weishop/news.list/'),
			array('title'=>'获得购物卡','icon'=>'icon-qiangdan','color'=>'#cc99ff','action'=>'jy_weishop/member.getcard/'),
			array('title'=>'我的购物车','icon'=>'icon-gouwuche','color'=>'#cc99ff','action'=>'jy_weishop/member.cart/'),
			array('title'=>'我的购物卡','icon'=>'icon-pingzhengzhongxin','color'=>'#cc99ff','action'=>'jy_weishop/member.mycard/'),
			array('title'=>'我的关注','icon'=>'icon-woguanzhudepinpai','color'=>'#cc99ff','action'=>'jy_weishop/member.favorite/'),
			array('title'=>'我的足迹','icon'=>'icon-zuji','color'=>'#cc99ff','action'=>'jy_weishop/member.history/'),
	);
	$item['red_mp3']=$item['red_mp3']?:'../addons/jy_city/resource/red.wav';
	$item=$this->plugin_setting('basic');
	$item['my_days'] = !empty($item['my_days']) ? $item['my_days'] : $my_days;
	$item['demomy_days'] = $my_days;
	$my_logs = array(
			array('title'=>'积分日志','icon'=>'icon-jifen','color'=>'#cc99ff','action'=>'core/member.credit_log/'),
			array('title'=>'余额日志','icon'=>'icon-jiangjiatongzhi','color'=>'#cc99ff','action'=>'core/member.credit_log/'),
			array('title'=>'提现日志','icon'=>'icon-trade','color'=>'#cc99ff','action'=>'core/member.cash_log/'),
			array('title'=>'红包日志','icon'=>'icon-ai-hongbao','color'=>'#cc99ff','action'=>'core/member.red_log/'),
	);
	$item['my_logs'] = !empty($item['my_logs']) ? $item['my_logs'] : $my_logs;
	$item['demomy_logs'] = $my_logs;
	$return['item']=$item;
	$return['item']['bankuai']=$return['item']['bankuai']?$return['item']['bankuai']:$bankuai;
	$return['item']['footernav']=$return['item']['footernav']?$return['item']['footernav']:$footernav;
	$return['item']['hdps']=$return['item']['hdps']?$return['item']['hdps']:$hdps;
	$return['item']['tags']=$return['item']['tags']?$return['item']['tags']:$tags;
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基本信息',
				'list'=>array(
					array('type'=>'string','title'=>'网站名称','name'=>'title'),
					array('type'=>'image','title'=>'网站logo','name'=>'logo'),
					array('type'=>'image','title'=>'网站ICO','name'=>'icon'),
					array('type'=>'string','title'=>'新商业自定义','name'=>'saletag'),
					array('type'=>'switch','title'=>'关闭签到','name'=>'no_sign'),
					array('type'=>'image','title'=>'首页顶部背景','name'=>'topbg','help'=>'高380，宽750'),
					array('type'=>'image','title'=>'首页横幅广告','name'=>'indexad','help'=>'高160，宽750'),
					array('type'=>'link','from'=>'action','title'=>'横幅广告链接','name'=>'indexadurl'),
					array('type'=>'string','title'=>'搜索框默认文字','name'=>'searchtitle','help'=>'默认：商家名称关键字'),
					array('type'=>'text','title'=>'首页热门搜索','name'=>'searchkeyword','help'=>'用|隔开，例如：奶茶|炸鸡'),
					array('type'=>'switch','title'=>'开启小程序过审','name'=>'is_guoshen'),
					array('type'=>'link','title'=>'小程序过审页面','name'=>'guoshen_url'),
					array('type'=>'array','title'=>'距离类型','name'=>'julitypes','add_tip'=>'添加一个距离类型',
								'list'=>array(
												array('type'=>'string','name'=>'title','title'=>'距离名称'),
												array('type'=>'string','name'=>'value','title'=>'距离的值（km）'),							
								),
								'details'=>array(
												array('type'=>'string','name'=>'title','title'=>'距离名称'),
												array('type'=>'string','name'=>'value','title'=>'距离的值（km）'),	
								)
					),
					array('type'=>'text','title'=>'商户参考标签','name'=>'tags','help'=>'用|隔开，例如：商家服务态度很好|经典套餐可以有，下次再来'),
					array('type'=>'string','title'=>'分享标题','name'=>'share_title'),
					array('type'=>'image','title'=>'分享图片','name'=>'share_image'),
					array('type'=>'string','title'=>'分享描述','name'=>'share_desc'),
				)
			),
			array(
					'title'=>'界面UI配色',
					'list'=>array(
						array('type'=>'color_pool','title'=>'选择配色方案','name'=>'syscolor','help'=>''),
						array('type'=>'colorpicker','title'=>'站点颜色','name'=>'syscolor','help'=>'自定义系统颜色系，默认： #18bc9c'),
						array('type'=>'phone_tpl','name'=>'syscolor'),
					)
			),
			array(
				'title'=>'幻灯片',
					'list'=>array(
						array(
							'type'=>'array',
							'name'=>'hdps',
							'add_tip'=>'添加一个幻灯片',
								'list'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片'),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								),
								'details'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片','help'=>''),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								)
						)
					)
			),
			array(
				'title'=>'板块导航',
					'list'=>array(
									array('type'=>'array','name'=>'bankuai','add_tip'=>'添加一个板块导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
			array(
				'title'=>'底部导航',
					'list'=>array(
									array('type'=>'array','name'=>'footernav','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标','help'=>'图标，例如：icon-shouye'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
			array(
					'title'=>'会员中心页面开关设置',
					'list'=>array(
						array('type'=>'tip','title'=>'如需DIY会员中心页面：移步DIY装修--添加页面--页面类型--选择会员中心'),
						array('type'=>'switch','title'=>'关闭我的订单','name'=>'no_order'),
						array('type'=>'switch','title'=>'关闭待激活商品','name'=>'no_verify'),
						array('type'=>'switch','title'=>'关闭我的日常','name'=>'no_days'),
						array('type'=>'switch','title'=>'关闭售后客服','name'=>'no_shkefu'),
						array('type'=>'switch','title'=>'关闭商户入口','name'=>'no_merchru'),
						array('type'=>'updemo','name'=>'my_days','demo'=>'demomy_days','title'=>'重置我的日常','help'=>'不知道添加什么我的日常？重置默认的一下试试！'),
						array('type'=>'array','title'=>'我的日常','name'=>'my_days','add_tip'=>'添加一个我的日常',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'日常名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'日常图标'),
										array('type'=>'string','name'=>'action','title'=>'日常链接'),
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'日常名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'日常图标'),
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'日常链接'),
									)
						),
						array('type'=>'switch','title'=>'关闭我的记录','name'=>'no_logs'),
						array('type'=>'updemo','name'=>'my_logs','demo'=>'demomy_logs','title'=>'重置我的记录','help'=>'不知道添加什么我的记录？重置默认的一下试试！'),
						array('type'=>'array','title'=>'我的记录','name'=>'my_logs','add_tip'=>'添加一个我的记录',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'记录名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'记录图标'),
										array('type'=>'string','name'=>'action','title'=>'记录链接'),
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'记录名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'记录图标'),
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'记录链接'),
									)
						),
						array('type'=>'tip','title'=>'其他导航列表'),
						array('type'=>'switch','title'=>'关闭其他导航','name'=>'no_others'),
						array('type'=>'updemo','name'=>'my_memberbtn','demo'=>'demomy_memberbtn','title'=>'重置导航','help'=>'不知道添加什么导航？重置默认的一下试试！'),
						array('type'=>'array','title'=>'其他导航','name'=>'my_memberbtn','add_tip'=>'添加一个导航按钮',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
						),
					)
				),
		),
	);
	$return['htmls']=$htmls;
	exi($return);
}
/*******basic*******/
/*******op*******/
